home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsIFastLoadFileControl.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  13KB  |  362 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIFastLoadFileControl.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIFastLoadFileControl_h__
  6. #define __gen_nsIFastLoadFileControl_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsrootidl_h__
  14. #include "nsrootidl.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21. class nsIFile; /* forward declaration */
  22.  
  23. class nsISimpleEnumerator; /* forward declaration */
  24.  
  25.  
  26. /* starting interface:    nsIFastLoadFileControl */
  27. #define NS_IFASTLOADFILECONTROL_IID_STR "8a1e2c63-af50-4147-af7e-26289dc180dd"
  28.  
  29. #define NS_IFASTLOADFILECONTROL_IID \
  30.   {0x8a1e2c63, 0xaf50, 0x4147, \
  31.     { 0xaf, 0x7e, 0x26, 0x28, 0x9d, 0xc1, 0x80, 0xdd }}
  32.  
  33. /**
  34.  * The nsIFastLoadFileControl interface and its subinterfaces are mix-ins for
  35.  * classes implementing nsIObjectInputStream and nsIObjectOutputStream, so that
  36.  * those stream types can be used with nsIFastLoadService to access and compute
  37.  * FastLoad file checksums, update and check FastLoad file dependencies, and
  38.  * multiplex documents loaded via non-blocking i/o.
  39.  *
  40.  * If an nsIObjectInputStream class doesn't support nsIFastLoadReadControl, or
  41.  * an nsIObjectOutputStream class doesn't support nsIFastLoadWriteControl, that
  42.  * implementation may still be useful for object serialization, but it can't be
  43.  * used to read or write a Mozilla FastLoad file.
  44.  */
  45. class NS_NO_VTABLE nsIFastLoadFileControl : public nsISupports {
  46.  public: 
  47.  
  48.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFASTLOADFILECONTROL_IID)
  49.  
  50.   /**
  51.      * Get and set the recorded checksum value from the FastLoad file header.
  52.      */
  53.   /* attribute PRUint32 checksum; */
  54.   NS_IMETHOD GetChecksum(PRUint32 *aChecksum) = 0;
  55.   NS_IMETHOD SetChecksum(PRUint32 aChecksum) = 0;
  56.  
  57.   /**
  58.      * Multiplexed document control methods.  A FastLoad file may contain
  59.      * multiple interleaved documents identified by a URI specifier string,
  60.      * and indexed for fast multiplexor select by an opaque URI object key.
  61.      * You StartMuxedDocument when initiating a document load, then Select
  62.      * before every batch of calls to (de)serialize document data, and End
  63.      * when the load completes.
  64.      *
  65.      * Document multiplexing is necessary to support incremental FastLoad
  66.      * development in a non-blocking i/o architecture such as Mozilla, where
  67.      * some (but not all, at first, or for a while during development) of the
  68.      * results of parsing and compiling various inputs can be multiplexed to
  69.      * or from a FastLoad file.
  70.      *
  71.      * Note: Select returns the previously selected URI object in case the
  72.      * caller is synchronously selecting and writing data to the FastLoad
  73.      * file, so the caller can reselect the previous URI and return to code
  74.      * the continues to write FastLoad data for the previous URI, unaware of
  75.      * the nested select/write/reselect.
  76.      */
  77.   /* void startMuxedDocument (in nsISupports aURI, in string aURISpec); */
  78.   NS_IMETHOD StartMuxedDocument(nsISupports *aURI, const char *aURISpec) = 0;
  79.  
  80.   /* nsISupports selectMuxedDocument (in nsISupports aURI); */
  81.   NS_IMETHOD SelectMuxedDocument(nsISupports *aURI, nsISupports **_retval) = 0;
  82.  
  83.   /* void endMuxedDocument (in nsISupports aURI); */
  84.   NS_IMETHOD EndMuxedDocument(nsISupports *aURI) = 0;
  85.  
  86.   /**
  87.      * Return true if aURISpec identifies a muxed document in the FastLoad
  88.      * file, false otherwise.
  89.      */
  90.   /* boolean hasMuxedDocument (in string aURISpec); */
  91.   NS_IMETHOD HasMuxedDocument(const char *aURISpec, PRBool *_retval) = 0;
  92.  
  93. };
  94.  
  95. /* Use this macro when declaring classes that implement this interface. */
  96. #define NS_DECL_NSIFASTLOADFILECONTROL \
  97.   NS_IMETHOD GetChecksum(PRUint32 *aChecksum); \
  98.   NS_IMETHOD SetChecksum(PRUint32 aChecksum); \
  99.   NS_IMETHOD StartMuxedDocument(nsISupports *aURI, const char *aURISpec); \
  100.   NS_IMETHOD SelectMuxedDocument(nsISupports *aURI, nsISupports **_retval); \
  101.   NS_IMETHOD EndMuxedDocument(nsISupports *aURI); \
  102.   NS_IMETHOD HasMuxedDocument(const char *aURISpec, PRBool *_retval); 
  103.  
  104. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  105. #define NS_FORWARD_NSIFASTLOADFILECONTROL(_to) \
  106.   NS_IMETHOD GetChecksum(PRUint32 *aChecksum) { return _to GetChecksum(aChecksum); } \
  107.   NS_IMETHOD SetChecksum(PRUint32 aChecksum) { return _to SetChecksum(aChecksum); } \
  108.   NS_IMETHOD StartMuxedDocument(nsISupports *aURI, const char *aURISpec) { return _to StartMuxedDocument(aURI, aURISpec); } \
  109.   NS_IMETHOD SelectMuxedDocument(nsISupports *aURI, nsISupports **_retval) { return _to SelectMuxedDocument(aURI, _retval); } \
  110.   NS_IMETHOD EndMuxedDocument(nsISupports *aURI) { return _to EndMuxedDocument(aURI); } \
  111.   NS_IMETHOD HasMuxedDocument(const char *aURISpec, PRBool *_retval) { return _to HasMuxedDocument(aURISpec, _retval); } 
  112.  
  113. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  114. #define NS_FORWARD_SAFE_NSIFASTLOADFILECONTROL(_to) \
  115.   NS_IMETHOD GetChecksum(PRUint32 *aChecksum) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChecksum(aChecksum); } \
  116.   NS_IMETHOD SetChecksum(PRUint32 aChecksum) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChecksum(aChecksum); } \
  117.   NS_IMETHOD StartMuxedDocument(nsISupports *aURI, const char *aURISpec) { return !_to ? NS_ERROR_NULL_POINTER : _to->StartMuxedDocument(aURI, aURISpec); } \
  118.   NS_IMETHOD SelectMuxedDocument(nsISupports *aURI, nsISupports **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectMuxedDocument(aURI, _retval); } \
  119.   NS_IMETHOD EndMuxedDocument(nsISupports *aURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->EndMuxedDocument(aURI); } \
  120.   NS_IMETHOD HasMuxedDocument(const char *aURISpec, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasMuxedDocument(aURISpec, _retval); } 
  121.  
  122. #if 0
  123. /* Use the code below as a template for the implementation class for this interface. */
  124.  
  125. /* Header file */
  126. class nsFastLoadFileControl : public nsIFastLoadFileControl
  127. {
  128. public:
  129.   NS_DECL_ISUPPORTS
  130.   NS_DECL_NSIFASTLOADFILECONTROL
  131.  
  132.   nsFastLoadFileControl();
  133.  
  134. private:
  135.   ~nsFastLoadFileControl();
  136.  
  137. protected:
  138.   /* additional members */
  139. };
  140.  
  141. /* Implementation file */
  142. NS_IMPL_ISUPPORTS1(nsFastLoadFileControl, nsIFastLoadFileControl)
  143.  
  144. nsFastLoadFileControl::nsFastLoadFileControl()
  145. {
  146.   /* member initializers and constructor code */
  147. }
  148.  
  149. nsFastLoadFileControl::~nsFastLoadFileControl()
  150. {
  151.   /* destructor code */
  152. }
  153.  
  154. /* attribute PRUint32 checksum; */
  155. NS_IMETHODIMP nsFastLoadFileControl::GetChecksum(PRUint32 *aChecksum)
  156. {
  157.     return NS_ERROR_NOT_IMPLEMENTED;
  158. }
  159. NS_IMETHODIMP nsFastLoadFileControl::SetChecksum(PRUint32 aChecksum)
  160. {
  161.     return NS_ERROR_NOT_IMPLEMENTED;
  162. }
  163.  
  164. /* void startMuxedDocument (in nsISupports aURI, in string aURISpec); */
  165. NS_IMETHODIMP nsFastLoadFileControl::StartMuxedDocument(nsISupports *aURI, const char *aURISpec)
  166. {
  167.     return NS_ERROR_NOT_IMPLEMENTED;
  168. }
  169.  
  170. /* nsISupports selectMuxedDocument (in nsISupports aURI); */
  171. NS_IMETHODIMP nsFastLoadFileControl::SelectMuxedDocument(nsISupports *aURI, nsISupports **_retval)
  172. {
  173.     return NS_ERROR_NOT_IMPLEMENTED;
  174. }
  175.  
  176. /* void endMuxedDocument (in nsISupports aURI); */
  177. NS_IMETHODIMP nsFastLoadFileControl::EndMuxedDocument(nsISupports *aURI)
  178. {
  179.     return NS_ERROR_NOT_IMPLEMENTED;
  180. }
  181.  
  182. /* boolean hasMuxedDocument (in string aURISpec); */
  183. NS_IMETHODIMP nsFastLoadFileControl::HasMuxedDocument(const char *aURISpec, PRBool *_retval)
  184. {
  185.     return NS_ERROR_NOT_IMPLEMENTED;
  186. }
  187.  
  188. /* End of implementation class template. */
  189. #endif
  190.  
  191.  
  192. /* starting interface:    nsIFastLoadReadControl */
  193. #define NS_IFASTLOADREADCONTROL_IID_STR "652ecec6-d40b-45b6-afef-641d6c63a35b"
  194.  
  195. #define NS_IFASTLOADREADCONTROL_IID \
  196.   {0x652ecec6, 0xd40b, 0x45b6, \
  197.     { 0xaf, 0xef, 0x64, 0x1d, 0x6c, 0x63, 0xa3, 0x5b }}
  198.  
  199. class NS_NO_VTABLE nsIFastLoadReadControl : public nsIFastLoadFileControl {
  200.  public: 
  201.  
  202.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFASTLOADREADCONTROL_IID)
  203.  
  204.   /**
  205.      * Computes the correct checksum of the FastLoad file, independent of the
  206.      * header's checksum value.  The header checksum field is treated as zero
  207.      * when computing the checksum.
  208.      */
  209.   /* PRUint32 computeChecksum (); */
  210.   NS_IMETHOD ComputeChecksum(PRUint32 *_retval) = 0;
  211.  
  212.   /**
  213.      * Get the collection of dependency nsIFile instances recorded during the
  214.      * FastLoad file write or read/update process, and checked during the read
  215.      * process to invalidate the FastLoad file if any dependencies are newer.
  216.      */
  217.   /* readonly attribute nsISimpleEnumerator dependencies; */
  218.   NS_IMETHOD GetDependencies(nsISimpleEnumerator * *aDependencies) = 0;
  219.  
  220. };
  221.  
  222. /* Use this macro when declaring classes that implement this interface. */
  223. #define NS_DECL_NSIFASTLOADREADCONTROL \
  224.   NS_IMETHOD ComputeChecksum(PRUint32 *_retval); \
  225.   NS_IMETHOD GetDependencies(nsISimpleEnumerator * *aDependencies); 
  226.  
  227. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  228. #define NS_FORWARD_NSIFASTLOADREADCONTROL(_to) \
  229.   NS_IMETHOD ComputeChecksum(PRUint32 *_retval) { return _to ComputeChecksum(_retval); } \
  230.   NS_IMETHOD GetDependencies(nsISimpleEnumerator * *aDependencies) { return _to GetDependencies(aDependencies); } 
  231.  
  232. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  233. #define NS_FORWARD_SAFE_NSIFASTLOADREADCONTROL(_to) \
  234.   NS_IMETHOD ComputeChecksum(PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ComputeChecksum(_retval); } \
  235.   NS_IMETHOD GetDependencies(nsISimpleEnumerator * *aDependencies) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDependencies(aDependencies); } 
  236.  
  237. #if 0
  238. /* Use the code below as a template for the implementation class for this interface. */
  239.  
  240. /* Header file */
  241. class nsFastLoadReadControl : public nsIFastLoadReadControl
  242. {
  243. public:
  244.   NS_DECL_ISUPPORTS
  245.   NS_DECL_NSIFASTLOADREADCONTROL
  246.  
  247.   nsFastLoadReadControl();
  248.  
  249. private:
  250.   ~nsFastLoadReadControl();
  251.  
  252. protected:
  253.   /* additional members */
  254. };
  255.  
  256. /* Implementation file */
  257. NS_IMPL_ISUPPORTS1(nsFastLoadReadControl, nsIFastLoadReadControl)
  258.  
  259. nsFastLoadReadControl::nsFastLoadReadControl()
  260. {
  261.   /* member initializers and constructor code */
  262. }
  263.  
  264. nsFastLoadReadControl::~nsFastLoadReadControl()
  265. {
  266.   /* destructor code */
  267. }
  268.  
  269. /* PRUint32 computeChecksum (); */
  270. NS_IMETHODIMP nsFastLoadReadControl::ComputeChecksum(PRUint32 *_retval)
  271. {
  272.     return NS_ERROR_NOT_IMPLEMENTED;
  273. }
  274.  
  275. /* readonly attribute nsISimpleEnumerator dependencies; */
  276. NS_IMETHODIMP nsFastLoadReadControl::GetDependencies(nsISimpleEnumerator * *aDependencies)
  277. {
  278.     return NS_ERROR_NOT_IMPLEMENTED;
  279. }
  280.  
  281. /* End of implementation class template. */
  282. #endif
  283.  
  284.  
  285. /* starting interface:    nsIFastLoadWriteControl */
  286. #define NS_IFASTLOADWRITECONTROL_IID_STR "2ad6e9e6-1379-4e45-a899-a54b27ff915c"
  287.  
  288. #define NS_IFASTLOADWRITECONTROL_IID \
  289.   {0x2ad6e9e6, 0x1379, 0x4e45, \
  290.     { 0xa8, 0x99, 0xa5, 0x4b, 0x27, 0xff, 0x91, 0x5c }}
  291.  
  292. class NS_NO_VTABLE nsIFastLoadWriteControl : public nsIFastLoadFileControl {
  293.  public: 
  294.  
  295.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFASTLOADWRITECONTROL_IID)
  296.  
  297.   /**
  298.      * Add a file dependency of the FastLoad file (e.g., a .jar file) to the
  299.      * set of dependencies that trigger regeneration if any dependency has a
  300.      * last-modified-time greater than the FastLoad file's mtime.
  301.      */
  302.   /* void addDependency (in nsIFile aFile); */
  303.   NS_IMETHOD AddDependency(nsIFile *aFile) = 0;
  304.  
  305. };
  306.  
  307. /* Use this macro when declaring classes that implement this interface. */
  308. #define NS_DECL_NSIFASTLOADWRITECONTROL \
  309.   NS_IMETHOD AddDependency(nsIFile *aFile); 
  310.  
  311. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  312. #define NS_FORWARD_NSIFASTLOADWRITECONTROL(_to) \
  313.   NS_IMETHOD AddDependency(nsIFile *aFile) { return _to AddDependency(aFile); } 
  314.  
  315. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  316. #define NS_FORWARD_SAFE_NSIFASTLOADWRITECONTROL(_to) \
  317.   NS_IMETHOD AddDependency(nsIFile *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddDependency(aFile); } 
  318.  
  319. #if 0
  320. /* Use the code below as a template for the implementation class for this interface. */
  321.  
  322. /* Header file */
  323. class nsFastLoadWriteControl : public nsIFastLoadWriteControl
  324. {
  325. public:
  326.   NS_DECL_ISUPPORTS
  327.   NS_DECL_NSIFASTLOADWRITECONTROL
  328.  
  329.   nsFastLoadWriteControl();
  330.  
  331. private:
  332.   ~nsFastLoadWriteControl();
  333.  
  334. protected:
  335.   /* additional members */
  336. };
  337.  
  338. /* Implementation file */
  339. NS_IMPL_ISUPPORTS1(nsFastLoadWriteControl, nsIFastLoadWriteControl)
  340.  
  341. nsFastLoadWriteControl::nsFastLoadWriteControl()
  342. {
  343.   /* member initializers and constructor code */
  344. }
  345.  
  346. nsFastLoadWriteControl::~nsFastLoadWriteControl()
  347. {
  348.   /* destructor code */
  349. }
  350.  
  351. /* void addDependency (in nsIFile aFile); */
  352. NS_IMETHODIMP nsFastLoadWriteControl::AddDependency(nsIFile *aFile)
  353. {
  354.     return NS_ERROR_NOT_IMPLEMENTED;
  355. }
  356.  
  357. /* End of implementation class template. */
  358. #endif
  359.  
  360.  
  361. #endif /* __gen_nsIFastLoadFileControl_h__ */
  362.